package com.sheng.whyclass.person.model;

import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2016/4/4.
 */
public class StudentInfoData extends BaseResult{


    /**
     * id : 1
     * name : xiaoming
     * pass : 123456
     * class : 1
     * department : ceshi
     */

    private DataBean data;

    public DataBean getData() {
        return data;
    }

    public void setData(DataBean data) {
        this.data = data;
    }

    public static class DataBean {
        private String id;
        private String name;
        private String pass;
        @SerializedName("class")
        private String classX;
        private String department;

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getPass() {
            return pass;
        }

        public void setPass(String pass) {
            this.pass = pass;
        }

        public String getClassX() {
            return classX;
        }

        public void setClassX(String classX) {
            this.classX = classX;
        }

        public String getDepartment() {
            return department;
        }

        public void setDepartment(String department) {
            this.department = department;
        }

        public static DataBean getFromJson(String json) {
            if (json == null) {
                return null;
            }
            Gson gson = new Gson();
            DataBean info = null;
            try {
                info = gson.fromJson(json, DataBean.class);
            } catch (JsonSyntaxException jsonSyntaxException) {
            }
            return info;
        }

        public static String toJsonString(DataBean data) {
            if (data == null) {
                return null;
            }
            String js = null;
            Gson gson = new Gson();
            try {
                js = gson.toJson(data);
            } catch (JsonSyntaxException jsonSyntaxException) {
            }

            return js;
        }



    }

    public static StudentInfoData getFromJson(String json) {
        if (json == null) {
            return null;
        }
        Gson gson = new Gson();
        StudentInfoData info = null;
        try {
            info = gson.fromJson(json, StudentInfoData.class);
        } catch (JsonSyntaxException jsonSyntaxException) {
        }
        return info;
    }
}
